/*
 * @Author: moonwater 13812995013@163.com
 * @Date: 2025-03-06 09:08:04
 * @LastEditors: moonwater 13812995013@163.com
 * @LastEditTime: 2025-03-06 09:59:49
 * @FilePath: \盐师22Git仓库\day09\Automobile.java
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
package day09;

public class Automobile {
    //属性
    private String brand;//车
    private String plateNumber;//车牌号
    //行为
    //计算租金的方法
    public double getRent(){
        double rent = 0.0;
        int days = 0;
        rent = days * 1;
        return rent;
    } 

    //get,set方法
    //品牌
    public String getBrand() {
        return brand;
    }
    public void setBrand(String brand) {
        this.brand = brand;
    }
    //车牌号
    public String getPlateNumber() {
        return plateNumber;
    }
    public void setPlateNumber(String plateNumber) {
        this.plateNumber = plateNumber;
    }
    //构造器
    //无参构造器
    public Automobile(){
    }
    //单参构造器
    public Automobile(String brand){
        this.brand = brand;
    }
    //全参构造器
    public Automobile(String brand,String plateNumber){
        this(brand);//调用单参构造器
        this.plateNumber = plateNumber;
    }

    public void show(){
        System.out.println("车辆的品牌是：" + brand + "车辆的车牌号为："+ plateNumber);
    }
    @Override
    public String toString(){
        return super.toString();
    }
}
